package com.hx.demo28.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.hx.demo28.dao.AdminDao;
import com.hx.demo28.pojo.Admin;
import com.hx.demo28.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AdminServiceImpl implements AdminService {
    @Autowired
    private AdminDao adminDao;


    @Override
    public Admin findById(Admin admin) {
        LambdaQueryWrapper<Admin> qq=new LambdaQueryWrapper<>();
        qq.eq(Admin::getName,admin.getName());
        qq.eq(Admin::getPwd,admin.getPwd());
        Admin admin1 = adminDao.selectOne(qq);
        return admin1;
    }
}
